var _ = require("lodash");
// _.cloneDeep(value)
// 进行的事深拷贝
const originalObject = {
  name: "John",
  age: 30,
  address: {
    city: "New York",
    country: "USA",
  },
};
// 通过深拷贝，可以完成生成一个新的对象，跟原来的没有任何关系
const deepCopy = _.cloneDeep(originalObject);
deepCopy.name = "Mike";
deepCopy.address.city = "Chicago";

console.log("Original Object:", originalObject);
console.log("Deep Copy:", deepCopy);
